import { getFldm } from '@/utils/get-fldm'
export const formItem = async (key: string) => {
  const obj: any = {
    dgdWtj: [
      {
        disabled: false,
        label: '案件名称',
        prop: 'ajmc',
        type: 'input',
        placeholder: '请输入案件名称',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '部门受案号',
        prop: 'bmsah',
        type: 'input',
        placeholder: '请输入部门受案号',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '统一受案号',
        prop: 'tysah',
        type: 'input',
        placeholder: '请输入统一受案号',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '检察官',
        prop: 'cbr',
        type: 'input',
        placeholder: '请输入检察官',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '办结日期',
        prop: 'ajbj-rq',
        type: 'daterange',
        placeholderStart: '请选择开始日期',
        placeholderEnd: '请选择结束日期',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '案件类别',
        prop: 'ajlbbms',
        type: 'treeSelectAll',
        showAllSelection: true,
        showCurrentButton: true,
        nodeKey: 'dm',
        isLeafNode: false,
        multiple: true,
        showAll: true,
        treeProps: {
          children: 'children',
          label: 'mc',
        },
        checkStrictly: false,
        placeholder: '请选择案件类别',
        options: [],
        iswm: 'N',
      },
      {
        disabled: false,
        label: '承办部门',
        prop: 'cbbmbms',
        showAllSelection: true,
        showCurrentButton: true,
        multiple: true,
        isLeafNode: false,
        nodeKey: 'dm',
        type: 'treeSelectAll',
        placeholder: '请选择承办部门',
        showAll: true,
        treeProps: {
          children: 'children',
          label: 'mc',
        },
        options: [],
        iswm: 'N',
      },
      {
        disabled: false,
        label: '案卷类别',
        prop: 'ajlxbm',
        type: 'treeSelect',
        placeholder: '请选择案卷类别',
        options: await getFldm('gd024'),
        iswm: 'N',
      },
      {
        disabled: false,
        label: '检测状态',
        prop: 'jcztbm',
        type: 'select',
        placeholder: '请选择检测状态',
        options: await getFldm('gd011'),
        iswm: 'Y',
      },

      {
        disabled: false,
        label: '纸质案卷',
        prop: 'sfzzajdm',
        type: 'select',
        placeholder: '请选择纸质案卷',
        options: await getFldm('gd009'),
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '音像',
        prop: 'sfyspdm',
        type: 'select',
        placeholder: '请选择音像',
        options: await getFldm('gd017'),
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '归档状态',
        prop: 'gdztdm',
        type: 'select',
        placeholder: '请选择归档状态',
        options: (await getFldm('gd014')).slice(0, 2),
        iswm: 'N',
      },
      // {
      //   disabled: false,
      //   label: '预警状态',
      //   prop: 'yjzt',
      //   type: 'select',
      //   placeholder: '请选择预警状态',
      //   options: [],
      //   iswm: 'N',
      // },
    ],
    dgdYtj: [
      {
        disabled: false,
        label: '案件名称',
        prop: 'ajmc',
        type: 'input',
        placeholder: '请输入案件名称',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '部门受案号',
        prop: 'bmsah',
        type: 'input',
        placeholder: '请输入部门受案号',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '统一受案号',
        prop: 'tysah',
        type: 'input',
        placeholder: '请输入统一受案号',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '检察官',
        prop: 'cbr',
        type: 'input',
        placeholder: '请输入检察官',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '提交日期',
        prop: 'tj-rq',
        type: 'daterange',
        placeholderStart: '请选择开始日期',
        placeholderEnd: '请选择结束日期',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '审核状态',
        prop: 'shztdm',
        type: 'select',
        placeholder: '请选择审核状态',
        options: (await getFldm('gd019')).filter(
          (item: any) =>
            item.dm === 'gd0190001' || item.dm === 'gd0190002' || item.dm === 'gd0190003',
        ),
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '案件类别',
        prop: 'ajlbbms',
        type: 'treeSelectAll',
        showAllSelection: true,
        showCurrentButton: true,
        nodeKey: 'dm',
        isLeafNode: false,
        multiple: true,
        showAll: true,
        treeProps: {
          children: 'children',
          label: 'mc',
        },
        checkStrictly: false,
        placeholder: '请选择案件类别',
        options: [],
        iswm: 'N',
      },
      {
        disabled: false,
        label: '承办部门',
        prop: 'cbbmbms',
        multiple: true,
        type: 'treeSelectAll',
        placeholder: '请选择承办部门',
        showAll: true,
        options: [],
        iswm: 'N',
      },
      {
        disabled: false,
        label: '案卷类别',
        prop: 'ajlxbm',
        type: 'treeSelect',
        placeholder: '请选择案卷类别',
        options: await getFldm('gd024'),
        iswm: 'N',
      },
      {
        disabled: false,
        label: '检测状态',
        prop: 'jcztbm',
        type: 'select',
        placeholder: '请选择检测状态',
        options: await getFldm('gd011'),
        iswm: 'N',
      },
      {
        disabled: false,
        label: '纸质案卷',
        prop: 'sfzzajdm',
        type: 'select',
        placeholder: '请选择纸质案卷',
        options: await getFldm('gd009'),
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '音像',
        prop: 'sfyspdm',
        type: 'select',
        placeholder: '请选择音像',
        options: await getFldm('gd017'),
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '归档状态',
        prop: 'gdztdm',
        type: 'select',
        placeholder: '请选择归档状态',
        options: await getFldm('gd014'),
        iswm: 'N',
      },
      // {
      //   disabled: false,
      //   label: '预警状态',
      //   prop: 'yjzt',
      //   type: 'select',
      //   placeholder: '请选择预警状态',
      //   options: [],
      //   iswm: 'N',
      // },
      {
        disabled: false,
        label: '办结日期',
        prop: 'ajbj-rq',
        type: 'daterange',
        placeholder: '请选择办结日期',
        placeholderStart: '请选择开始日期',
        placeholderEnd: '请选择结束日期',
        iswm: 'N',
      },
    ],
    dgdYth: [
      {
        disabled: false,
        label: '案件名称',
        prop: 'ajmc',
        type: 'input',
        placeholder: '请输入案件名称',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '部门受案号',
        prop: 'bmsah',
        type: 'input',
        placeholder: '请输入部门受案号',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '统一受案号',
        prop: 'tysah',
        type: 'input',
        placeholder: '请输入统一受案号',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '检察官',
        prop: 'cbr',
        type: 'input',
        placeholder: '请输入检察官',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '提交日期',
        prop: 'tj-rq',
        type: 'daterange',
        placeholderStart: '请选择开始日期',
        placeholderEnd: '请选择结束日期',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '审核状态',
        prop: 'shztdm',
        type: 'select',
        placeholder: '请选择检测状态',
        options: (await getFldm('gd019')).filter(
          (item: any) =>
            item.dm === 'gd0190004' || item.dm === 'gd0190005' || item.dm === 'gd0190006',
        ),
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '案件类别',
        prop: 'ajlbbms',
        type: 'treeSelectAll',
        showAllSelection: true,
        showCurrentButton: true,
        nodeKey: 'dm',
        isLeafNode: false,
        multiple: true,
        showAll: true,
        treeProps: {
          children: 'children',
          label: 'mc',
        },
        checkStrictly: false,
        placeholder: '请选择案件类别',
        options: [],
        iswm: 'N',
      },
      {
        disabled: false,
        label: '承办部门',
        prop: 'cbbmbms',
        multiple: true,
        checkStrictly: false,
        type: 'treeSelectAll',
        placeholder: '请选择承办部门',
        options: [],
        showAll: true,
        iswm: 'N',
      },
      {
        disabled: false,
        label: '案卷类别',
        prop: 'ajlxbm',
        type: 'treeSelect',
        placeholder: '请选择案卷类别',
        options: await getFldm('gd024'),
        iswm: 'N',
      },
      {
        disabled: false,
        label: '检测状态',
        prop: 'jcztbm',
        type: 'select',
        placeholder: '请选择检测状态',
        options: await getFldm('gd011'),
        iswm: 'N',
      },
      {
        disabled: false,
        label: '纸质案卷',
        prop: 'sfzzajdm',
        type: 'select',
        placeholder: '请选择纸质案卷',
        options: await getFldm('gd009'),
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '音像',
        prop: 'sfyspdm',
        type: 'select',
        placeholder: '请选择音像',
        options: await getFldm('gd017'),
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '归档状态',
        prop: 'gdztdm',
        type: 'select',
        placeholder: '请选择归档状态',
        options: await getFldm('gd014'),
        iswm: 'N',
      },
      // {
      //   disabled: false,
      //   label: '预警状态',
      //   prop: 'yjzt',
      //   type: 'select',
      //   placeholder: '请选择预警状态',
      //   options: [],
      //   iswm: 'N',
      // },
      {
        disabled: false,
        label: '办结日期',
        prop: 'ajbj-rq',
        type: 'daterange',
        placeholder: '请选择办结日期',
        placeholderStart: '请选择开始日期',
        placeholderEnd: '请选择结束日期',
        iswm: 'N',
      },
    ],

    dgdTgz: [
      {
        disabled: false,
        label: '案件名称',
        prop: 'ajmc',
        type: 'input',
        placeholder: '请输入案件名称',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '部门受案号',
        prop: 'bmsah',
        type: 'input',
        placeholder: '请输入部门受案号',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '统一受案号',
        prop: 'tysah',
        type: 'input',
        placeholder: '请输入统一受案号',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '检察官',
        prop: 'cbr',
        type: 'input',
        placeholder: '请输入检察官',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '申请日期',
        prop: 'tj-rq',
        type: 'daterange',
        placeholderStart: '请选择开始日期',
        placeholderEnd: '请选择结束日期',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '审核状态',
        prop: 'shztdm',
        type: 'select',
        placeholder: '请选择审核状态',
        options: await getFldm('gd019'),
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '案件类别',
        prop: 'ajlbbms',
        type: 'treeSelectAll',
        showAllSelection: true,
        showCurrentButton: true,
        nodeKey: 'dm',
        isLeafNode: false,
        multiple: true,
        showAll: true,
        treeProps: {
          children: 'children',
          label: 'mc',
        },
        checkStrictly: false,
        placeholder: '请选择案件类别',
        options: [],
        iswm: 'N',
      },
      {
        disabled: false,
        label: '承办部门',
        prop: 'cbbmbms',
        type: 'treeSelectAll',
        multiple: true,
        placeholder: '请选择承办部门',
        showAll: true,
        options: [],
        iswm: 'N',
      },
      {
        disabled: false,
        label: '案卷类别',
        prop: 'ajlxbm',
        type: 'treeSelect',
        placeholder: '请选择案卷类别',
        options: await getFldm('gd024'),
        iswm: 'N',
      },
      {
        disabled: false,
        label: '检测状态',
        prop: 'jcztbm',
        type: 'select',
        placeholder: '请选择检测状态',
        options: await getFldm('gd011'),
        iswm: 'N',
      },
      {
        disabled: false,
        label: '纸质案卷',
        prop: 'sfzzajdm',
        type: 'select',
        placeholder: '请选择纸质案卷',
        options: await getFldm('gd009'),
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '音像',
        prop: 'sfyspdm',
        type: 'select',
        placeholder: '请选择音像',
        options: await getFldm('gd017'),
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '归档状态',
        prop: 'gdztdm',
        type: 'select',
        placeholder: '请选择归档状态',
        options: await getFldm('gd014'),
        iswm: 'N',
      },
      // {
      //   disabled: false,
      //   label: '预警状态',
      //   prop: 'yjzt',
      //   type: 'select',
      //   placeholder: '请选择预警状态',
      //   options: [],
      //   iswm: 'N',
      // },
      {
        disabled: false,
        label: '办结日期',
        prop: 'ajbj-rq',
        type: 'daterange',
        placeholder: '请选择办结日期',
        placeholderStart: '请选择开始日期',
        placeholderEnd: '请选择结束日期',
        iswm: 'N',
      },
    ],
    ygdList: [
      {
        disabled: false,
        label: '案件名称',
        prop: 'ajmc',
        type: 'input',
        placeholder: '请输入案件名称',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '部门受案号',
        prop: 'bmsah',
        type: 'input',
        placeholder: '请输入部门受案号',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '统一受案号',
        prop: 'tysah',
        type: 'input',
        placeholder: '请输入统一受案号',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '检察官',
        prop: 'cbjcg',
        type: 'input',
        placeholder: '请输入检察官',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '归档状态',
        prop: 'gdztdm',
        type: 'select',
        placeholder: '请选择归档状态',
        options: await getFldm('gd014'),
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '归档日期',
        prop: 'gd-rq',
        type: 'daterange',
        placeholderStart: '请选择开始日期',
        placeholderEnd: '请选择结束日期',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '档号',
        prop: 'dh',
        type: 'input',
        placeholder: '请输入档号',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '纸质案卷',
        prop: 'sfzzajdm',
        type: 'select',
        placeholder: '请选择纸质案卷',
        options: await getFldm('gd009'),
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '音像',
        prop: 'sfyspdm',
        type: 'select',
        placeholder: '请选择音像',
        options: await getFldm('gd017'),
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '退改状态',
        prop: 'tgztdm',
        type: 'select',
        placeholder: '请选择退改状态',
        options: await getFldm('gd015'),
        iswm: 'Y',
      },
      // {
      //   disabled: false,
      //   label: '提交日期',
      //   prop: 'tj-rq',
      //   type: 'daterange',
      //   placeholderStart: '请选择开始日期',
      //   placeholderEnd: '请选择结束日期',
      //   iswm: 'N',
      // },
      // {
      //   disabled: false,
      //   label: '审核状态',
      //   prop: 'shztdm',
      //   type: 'select',
      //   placeholder: '请选择审核状态',
      //   options: await getFldm('gd019'),
      //   iswm: 'N',
      // },
      {
        disabled: false,
        label: '案件类别',
        prop: 'ajlbbms',
        type: 'treeSelectAll',
        showAllSelection: true,
        showCurrentButton: true,
        nodeKey: 'dm',
        isLeafNode: false,
        multiple: true,
        showAll: true,
        treeProps: {
          children: 'children',
          label: 'mc',
        },
        checkStrictly: false,
        placeholder: '请选择案件类别',
        options: [],
        iswm: 'N',
      },
      {
        disabled: false,
        label: '承办部门',
        multiple: true,
        prop: 'cbbmbms',
        type: 'treeSelectAll',
        placeholder: '请选择承办部门',
        showAll: true,
        options: [],
        iswm: 'N',
      },
      {
        disabled: false,
        label: '案卷类别',
        prop: 'ajlxbm',
        type: 'treeSelect',
        placeholder: '请选择案卷类别',
        options: await getFldm('gd024'),
        iswm: 'N',
      },
      // {
      //   disabled: false,
      //   label: '检测状态',
      //   prop: 'jcztbm',
      //   type: 'select',
      //   placeholder: '请选择检测状态',
      //   options: await getFldm('gd011'),
      //   iswm: 'N',
      // },

      // {
      //   disabled: false,
      //   label: '预警状态',
      //   prop: 'yjzt',
      //   type: 'select',
      //   placeholder: '请选择预警状态',
      //   options: [],
      //   iswm: 'N',
      // },
      {
        disabled: false,
        label: '办结日期',
        prop: 'bj-rq',
        type: 'daterange',
        placeholder: '请选择办结日期',
        placeholderStart: '请选择开始日期',
        placeholderEnd: '请选择结束日期',
        iswm: 'N',
      },
    ],
    tgjlList: [],
  }
  return obj[key]
}
